/*
 * @Description:
 * @Author: CcSimple
 * @Github: https://github.com/CcSimple
 * @Date: 2023-02-09 10:40:26
 * @LastEditors: CcSimple
 * @LastEditTime: 2023-02-09 11:37:21
 */
import { hiprint } from "vue-plugin-hiprint";
export const provider1 = function () {
    var addElementTypes = function (context) {
        context.removePrintElementTypes("providerModule1");
        context.addPrintElementTypes("providerModule1", [
            new hiprint.PrintElementTypeGroup("常规", [
                {
                    tid: "providerModule1.barcode",
                    title: "条形码",
                    data: "XS888888888",
                    type: "text",
                    options: {
                        field: "barcode",
                        testData: "XS888888888",
                        height: 32,
                        fontSize: 12,
                        lineHeight: 18,
                        textAlign: "left",
                        textType: "barcode"
                    }
                },
                {
                    tid: "providerModule1.qrcode",
                    title: "二维码",
                    data: "XS888888888",
                    type: "text",
                    options: {
                        field: "qrcode",
                        testData: "XS888888888",
                        height: 32,
                        fontSize: 12,
                        lineHeight: 18,
                        textType: "qrcode"
                    }
                },
                { tid: "providerModule1.image", title: "Logo", data: "", type: "image" },
                {
                    tid: "providerModule1.table",
                    title: "表格示例",
                    type: "table",
                    options: {
                        field: "table"
                    },
                    columns: [
                        [
                            { title: "编码", align: "center", field: "NAME", width: 100 },
                            { title: "名称", align: "center", field: "SL", width: 100 }
                        ]
                    ]
                },
                { tid: "providerModule2.customText", title: "文本", customText: "自定义文本", custom: true, type: "text" },
                {
                    tid: "providerModule2.longText",
                    title: "长文本",
                    type: "longText",
                    options: {
                        field: "test.longText",
                        width: 200,
                        testData: "长文本分页/不分页测试"
                    }
                }
            ]),
            new hiprint.PrintElementTypeGroup("辅助", [
                {
                    tid: "providerModule2.hline",
                    title: "横线",
                    type: "hline"
                },
                {
                    tid: "providerModule2.vline",
                    title: "竖线",
                    type: "vline"
                },
                {
                    tid: "providerModule2.rect",
                    title: "矩形",
                    type: "rect"
                },
                {
                    tid: "providerModule2.oval",
                    title: "椭圆",
                    type: "oval"
                }
            ])
        ]);
    };
    return {
        addElementTypes: addElementTypes
    };
};
